<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    {
        var name = "你说话"
    }
    console.log(name)

    {
        let sex = "let"
        console.log(sex)
    }
    console.log(sex)//sex is not defined
</script>

</html>